I have this interface:
Product.ts
import { Category } from "@/Models/Category";
export interface Product {
id: number;
name: string;
slug: string;
description: string;
price: number;
categories: Category[];
quantity: number;
}
and Category.ts
import { Product } from "@/Models/Product"
export interface Category {
id: number
name: string
slug: string
// relations
products: Product[]
}
And then I am getting this error:
Uncaught SyntaxError: The requested module '/src/Models/Product.ts?t=1654212769656' does not provide an export named 'Product' (at Category.ts:1:1)
I try to solve using export default, and remove the brackets in the file that is importing, but the error remains, what can I do?
This is my tsconfig.json
{
"extends": "@vue/tsconfig/tsconfig.web.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
},
"references": [
{
"path": "./tsconfig.vite-config.json"
}
]
}
Thanks.